#pragma once

#include "PresentParameters.h"

namespace Vortex { namespace Wrapper { namespace Direct3D {
	
	///<summary>Wrapper of IDirect3D9VertexDeclaration9 interface</summary>
	public ref class Direct3DVertexDeclaration9  {
		IDirect3DVertexDeclaration9 * _handle;

	public:
		Direct3DVertexDeclaration9(IDirect3DVertexDeclaration9 * declaration) : _handle(declaration) {
		}

		~Direct3DVertexDeclaration9() {
			if (_handle) {
				_handle->Release();
				_handle = NULL;
			}
		}

		///<summary>Direct3DDevice handle</summary>
		property IntPtr Handle { IntPtr get() { return IntPtr(_handle); } }

		///<summary>Native Direct3DDevice handle</summary>
		property IDirect3DVertexDeclaration9* NativeHandle { IDirect3DVertexDeclaration9* get() { return _handle; } }
	};

}}}